﻿using System;
using System.Linq;

class Program
{
    static void Main(string[] args)
    {
        int[] numbers = new int[100];
        Random random = new Random();
        for (int i = 0; i < 100; i++)
        {
            numbers[i] = random.Next(0, 1001);
        }

        var sortedNumbers = numbers.OrderByDescending(x => x);
        int sum = sortedNumbers.Sum();
        double average = sortedNumbers.Average();

        Console.WriteLine("排序后的整数数组：");
        foreach (var num in sortedNumbers)
        {
            Console.Write(num+" ");
        }
        Console.WriteLine("");
        Console.WriteLine($"总和：{sum}");
        Console.WriteLine($"平均数：{average}");
    }
}
